package adv327;

/**
 * @author oldliu
 * @since 1.0
 */
public class Person {
    private String name;
    private String sex;

    public void setSex(String s){
        if("男".equals(s)||s.equals("女")){
            this.sex=s;
            return;
        }
        throw new RuntimeException("性别"+s+"不合法");
    }
}
